package br.edu.fanor.esfinge.business.impl;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.ejb.EJB;
import javax.ejb.Stateless;

import br.edu.fanor.esfinge.business.AreaAcademicaSession;
import br.edu.fanor.esfinge.dao.AreaAcademicaDAO;
import br.edu.fanor.esfinge.entity.AreaAcademica;

@Stateless(mappedName="ejb/areacademicaSession")
public class AreaAcademicaSessionImpl implements AreaAcademicaSession {
	
	@EJB
	public AreaAcademicaDAO areaacademicaDAO;
	
	@Override
	public void inserir(AreaAcademica areaacademica) {
		areaacademicaDAO.inserir(areaacademica);
		
	}

	@PostConstruct
	public void postConstruct() {
		System.out.println("Criou o EJB");
	}
		
	@PreDestroy
	public void preDestroy(){
		System.out.println("Destruiu o EJB");
	}
	

}
